﻿@page "/editors"
@inject SwalService SwalService
@inject IStringLocalizer<Editors> Localizer

<h3>@Localizer["Title"]</h3>

<h4>@((MarkupString)Localizer["H1"].Value)</h4>

<p>@((MarkupString)Localizer["P1"].Value)</p>

<Block Title="@Localizer["Block1Title"]" Introduction="@Localizer["Block1Intro"]">
    <p>@((MarkupString)Localizer["P2"].Value)</p>
    <div class="form-control mb-3">@((MarkupString)Localizer["Div1"].Value)</div>
    <Editor></Editor>
</Block>

<Block Title="@Localizer["Block2Title"]" Introduction="@Localizer["Blcok2Intro"]">
    <p>@((MarkupString)Localizer["P3"].Value)</p>
    <Editor Placeholder="@Localizer["Placeholder1"]"></Editor>
</Block>

<Block Title="@Localizer["Block3Title"]" Introduction="@Localizer["Block3Intro"]">
    <Editor IsEditor="true"></Editor>
</Block>

<Block Title="@Localizer["Block4Title"]" Introduction="@Localizer["Block4Intro"]">
    <Editor IsEditor="true" Height="400"></Editor>
</Block>

<Block Title="@Localizer["Block5Title"]" Introduction="@Localizer["Block5Intro"]">
    <p>@((MarkupString)Localizer["P4"].Value)</p>
    <Editor @bind-Value="@EditorValue" OnValueChanged="@OnValueChanged"></Editor>

    <label class="form-label mt-3">@Localizer["Label1"]</label>
    <textarea class="form-control mt-3">@EditorValue</textarea>
    <div class="mt-3">
        <Button OnClick="SetValue">Reset</Button>
    </div>
</Block>

<Block Title="@Localizer["Block6Title"]" Introduction="@Localizer["Blcok6Intro"]">
    <p>@((MarkupString)Localizer["P5"].Value)</p>
    <Editor IsEditor="true" OnClickButton="@PluginClick" CustomerToolbarButtons="@EditorPluginItems"></Editor>
</Block>

<Block Title="@Localizer["Block7Title"]" Introduction="@Localizer["Block7Intro"]">
    <p>@((MarkupString)Localizer["P6"].Value)</p>
    <Editor IsEditor="true" ToolbarItems="@ToolbarItems"></Editor>
</Block>

<SweetAlert />

<AttributeTable Items="@GetAttributes()" />
